const routes = [
  //每一项修改了component后，都是一条路由规则，可以直接通过addRoute（4.0）push到路由表里
  //首页可以放在基本配置里，也可以在动态路由里，看需求而定
  // {
  //   path: '/',
  //   component: 'Layout',
  //   redirect: '/home',
  //   // alwaysShow: true,
  //   // meta: { title: '首页', icon: 'dashboard' },
  //   children: [
  //     {
  //       path: '/home',
  //       name: 'home',
  //       component: 'views/home.vue',
  //       meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
  //     }
  //   ]
  // },
  {
    path: '/operationalSupervision',
    component: 'Layout',
    redirect: 'noRedirect',
    alwaysShow: true,
    // redirect: '/operationalSupervision/passengerFlow',
    name: 'operationalSupervision',
    meta: { title: '交通运行监测', icon: 'monitor' },
    children: [
      {
        path: 'http://396025w9w3.wicp.vip:8882/mhjw_pc2/#/lkkl/lkkljk',
        name: 'http://396025w9w3.wicp.vip:8882/mhjw_pc2/#/lkkl/lkkljk',
        component: 'ParentView',
        meta: { title: '重点区域大客流监控及网约车调度管理', icon: 'monitor', noCache: false, link: 'http://396025w9w3.wicp.vip:8882/mhjw_pc2/#/lkkl/lkkljk' }
      }
    ]
  },
  {
    path: '/facilityManagement',
    component: 'Layout',
    redirect: 'noRedirect',
    alwaysShow: true,
    // redirect: '/facilityManagement/eventLinkage',
    name: 'facilityManagement',
    meta: { title: '交通设施管理', icon: 'excel' },
    children: [
      {
        path: '/facilityManagement/eventLinkage',
        name: 'facilityManagement-eventLinkage',
        component: 'views/facilityManagement/eventLinkage/index.vue',
        meta: { title: '道路运行监测及事件联动处置', icon: 'server' }
      }
      // {
      //   path: '/facilityManagement/eventLinkage',
      //   name: 'facilityManagement-eventLinkage',
      //   component: 'views/facilityManagement/eventLinkage/index.vue',
      //   alwaysShow: true,
      //   redirect: 'noRedirect',
      //   meta: { title: '道路运行监测及事件联动处置' },
      //   children: [
      //     {
      //       path: '/facilityManagement/eventLinkage',
      //       name: 'facilityManagement-eventLinkage',
      //       component: 'views/facilityManagement/eventLinkage/index.vue',
      //       meta: { title: '道路运行监测及事件联动处置' }
      //     }
      //   ]
      // }
    ]
  },
  {
    path: '/industryManagement',
    component: 'Layout',
    redirect: 'noRedirect',
    alwaysShow: true,
    // redirect: '/industryManagement/groundBuses',
    name: 'industryManagement',
    meta: { title: '交通行业管理', icon: 'job' },
    children: [
      {
        path: '/industryManagement/groundBuses',
        name: 'industryManagement-groundBuses',
        component: 'views/industryManagement/groundBuses/index.vue',
        meta: { title: '地面公交管理', icon: 'edit' }
      },
      {
        path: '/industryManagement/commercialVehicles',
        name: 'industryManagement-commercialVehicles',
        component: 'views/industryManagement/commercialVehicles/index.vue',
        meta: { title: '重点营运车辆管理', icon: 'lock' }
      },
      {
        path: '/industryManagement/bikeSharing',
        name: 'industryManagement-bikeSharing',
        component: 'views/industryManagement/bikeSharing/index.vue',
        meta: { title: '共享单车管理', icon: 'log' }
      }
    ]
  },
  {
    path: '/transportationLaw',
    component: 'Layout',
    redirect: 'noRedirect',
    alwaysShow: true,
    // redirect: '/transportationLaw/industryEnforcement',
    name: 'transportationLaw',
    meta: { title: '交通综合监管', icon: 'education' },
    children: [
      {
        path: '/transportationLaw/industryEnforcement',
        name: 'transportationLaw-industryEnforcement',
        component: 'views/transportationLaw/industryEnforcement/index.vue',
        meta: { title: '交通运输行业安全生产监测管理', icon: 'money' }
      }
    ]
  },
  {
    path: '/projectManagement',
    component: 'Layout',
    redirect: 'noRedirect',
    // redirect: '/projectManagement/index',
    name: 'projectManagement',
    meta: { title: '交通工程管理', icon: 'size' },
    children: [
      {
        path: '/projectManagement/index',
        name: 'projectManagement-index',
        component: 'views/projectManagement/index.vue',
        meta: { title: '交通工程管理', icon: 'list' }
      }
    ]
  },
  {
    path: '/commandDispatch',
    component: 'Layout',
    redirect: 'noRedirect',
    // redirect: '/commandDispatch/index',
    name: 'commandDispatch',
    meta: { title: '应急指挥调度', icon: 'component' },
    children: [
      {
        path: '/commandDispatch/index',
        name: 'commandDispatch/index',
        component: 'views/commandDispatch/index.vue',
        meta: { title: '应急指挥调度', icon: 'clipboard' }
      }
    ]
  },
  // {
  //   name: 'test',
  //   path: 'http://ruoyi.vip',
  //   hidden: false,
  //   component: 'Layout',
  //   redirect: 'noRedirect',
  //   meta: {
  //     title: '若依官网',
  //     icon: 'guide',
  //     noCache: false,
  //     link: 'http://ruoyi.vip'
  //   }
  // },
  {
    path: '/systemManagement',
    component: 'Layout',
    redirect: 'noRedirect',
    alwaysShow: true,
    // redirect: '/systemManagement/yhgl',
    name: 'systemManagement',
    meta: { title: '系统管理', icon: 'el-icon-document' },
    hidden: true,
    children: [
      {
        path: '/systemManagement/yhgl',
        name: 'systemManagement-yhgl',
        component: 'views/systemManagement/yhgl/index.vue',
        meta: { title: '用户管理' },
        hidden: true
      },
      {
        path: '/systemManagement/jsgl',
        name: 'systemManagement-jsgl',
        component: 'views/systemManagement/jsgl/index.vue',
        meta: { title: '角色管理' },
        hidden: true
      },
      {
        path: '/systemManagement/qxgl',
        name: 'systemManagement-qxgl',
        component: 'views/systemManagement/qxgl/index.vue',
        meta: { title: '菜单管理' },
        hidden: true
      },
      {
        path: '/systemManagement/rzgl',
        name: 'systemManagement-rzgl',
        component: 'views/systemManagement/rzgl/index.vue',
        meta: { title: '日志管理' },
        hidden: true
      },
      {
        path: '/systemManagement/bbgl',
        name: 'systemManagement-bbgl',
        component: 'views/systemManagement/bbgl/index.vue',
        meta: { title: '报表管理' },
        hidden: true
      },
      {
        path: '/systemManagement/spzx',
        name: 'systemManagement-spzx',
        component: 'views/systemManagement/spzx/index.vue',
        meta: { title: '视频中心' },
        hidden: true
      },
      {
        path: '/systemManagement/zzjg',
        name: 'systemManagement-zzjg',
        component: 'views/systemManagement/zzjg/index.vue',
        meta: { title: '组织机构' },
        hidden: true
      },
      {
        path: '/systemManagement/yjzx',
        name: 'systemManagement-yjzx',
        component: 'views/systemManagement/yjzx/index.vue',
        meta: { title: '预警中心' },
        hidden: true
      }
    ]
  }
]
export const resRoutes = {
  url: '/vue-admin-template/permission/getroutes',
  type: 'get',
  dataList: routes,
  response: () => {
    return {
      code: 20000,
      dataList: routes
    }
  }
}
// export const resRoutes = {
//   url: '/vue-admin-template/permission/getroutes',
//   type: 'get',
//   data: { list: routes },
//   response: () => {
//     return {
//       code: 20000,
//       data: { list: routes }
//     }
//   }
// }
